package com.bkbw.live.battle.util;

import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;

import com.bkbw.live.common.dataproto.ClientToBattleServerPb.Vector3d;

public class Vector3Helper {
	public static Vector3d convertToDataprotoVector3(Vector3D v1) 
	{
		Vector3d.Builder builder = Vector3d.newBuilder();
		builder.setX((float)v1.getX());
		builder.setY((float)v1.getY());
		builder.setZ((float)v1.getZ());
		return builder.build();
	}
	
	public static Vector3D convertToApacheVector3(Vector3d v)
	{
		Vector3D v3 = new Vector3D(v.getX(), v.getY(), v.getZ());
		return v3;
	}
	
}
